<%@ page language="java" import="java.util.*,com.ccl.impl.*,com.ccl.model.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style>
body{
	 margin:0;
	}
   .div1{
	background: #000;
	color: #FFF;
	width: 100%;
	height: 80px;
	display: table-cell;
	text-align: center;
	vertical-align: middle;
	float: left;
	   }
	.div2{
		background-color:#000000 ;
	     color: #FFF;
		}
		td{
			color:#FFF;
			text-align: center;
		}
		td a{
		   color: #FFF;
		}
</style>
  </head>
  
  <body>
  <div style="background-color:#000000; height: 100%">
  
 <div class="div1">
  <h1 style="size:20px">新闻发布管理</h1>
</div>

<div class="div2">
<table width="100%" border="2" style="text-align:center; font-family:'微软雅黑';">
  <tr>
    <td width="16%"> <a href="#">首页</a></td>
    <td  width="16%"><a href="login.jsp">登录页面</a></td>
    <td  width="16%"><a href="addAdmin.jsp">增加Admin</a></td>
    <td  width="16%"><a href="userModify.jsp">更改信息</a></td>
    <td  width="16%"><a href="addNews.jsp">新闻发布</a></td>
    <td  width="16%"><a href="listNews.jsp">News详情</a></td>

  </tr>
</table>
</div>
<div style="text-align: center;"><%=session.getAttribute("kk") %></div>
   <%
     //session.invalidate();//清空所有的session
     session.removeAttribute("kk");
     NewsDayimpl news = new NewsDayimpl();
     List<NewsDay> list = news.queryNewss();     
    %>
  <%for(NewsDay p:list){  %> 
  <div class="div2">
  <table border="2" width="100%" >
  <tr>
    <td width="20%"><%=p.getDate()%></td>
    <td width="72%"><%=p.getTitle()%></td>
    <td width="8%"><a href="detailNews.jsp?number=<%=p.getNumber()%>">查看新闻</a></td>
  </tr> 
  </table>
  </div>

  <%} %>

   
   </div>
  </body>
</html>
